package com.central.scheduler.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.central.db.mapper.SuperMapper;
import com.central.scheduler.dao.model.Environment;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author Tindy
 * @date 2021/11/7
 * @describe
 * environment mapper interface
 */
@Mapper
public interface EnvironmentMapper extends SuperMapper<Environment> {

    /**
     * query environment by name
     *
     * @param name name
     * @return environment
     */
    Environment queryByEnvironmentName(@Param("environmentName") String name);

       /**
     * query all environment list
     * @return environment list
     */
    List<Environment> queryAllEnvironmentList();

    /**
     * environment page
     * @param page page
     * @param searchName searchName
     * @return environment IPage
     */
    IPage<Environment> queryEnvironmentListPaging(IPage<Environment> page, @Param("searchName") String searchName);
}
